package com.sakila.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.sakila.dao.InventoryDao;
import com.sakila.pojo.Film;
import com.sakila.pojo.Inventory;
import com.sakila.pojo.Store;
import com.sakila.service.InventoryService;

@Service
public class InventoryServiceImpl implements InventoryService {
	@Resource
	private InventoryDao inventoryDao;

	@Override
	public List<Inventory> findByFilmAndStore(Integer FilmId, Integer StoreId) {
		Film film = new Film();
		film.setId(FilmId);
		Store store = new Store();
		store.setId(StoreId);
		return inventoryDao.findByFilmAndStore(film, store);
	}
}
